﻿@model MVCBlog.Web.Models.Administration.ImagesSelectionViewModel
@inject Microsoft.AspNetCore.Mvc.Localization.IViewLocalizer Localizer

@if (Model!.Images.Count > 0)
{
    foreach (var image in Model.Images)
    {
        <figure class="figure mr-3 mb-3">
            <a href="~/blogimages/@image.Path" class="selectImage" data-markdown="![@image.Name](@this.Context.Request.Scheme://@this.Context.Request.Host@this.Context.Request.PathBase/blogimages/@image.Path)">
                <img src="~/blogimages/@image.Path" alt="@image.Name" class="img-thumbnail" style="max-width:150px; max-height:150px" />
            </a>
            <figcaption class="figure-caption mt-1">@image.Name</figcaption>
        </figure>
    }
}
else
{
    <p>@Localizer["No images found"]</p>
}